//
//  WorkCell.m
//  Ten
//
//  Created by anfuer on 2018/10/31.
//  Copyright © 2018年 xg韦. All rights reserved.
//

#import "WorkCell.h"

@implementation WorkCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (instancetype)CellWithTableView:(UITableView *)tableView
{
    static NSString *reuseId = @"WorkCell";
    WorkCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseId];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"WorkCell" owner:nil options:nil] lastObject];
    }
    return cell;
}

- (IBAction)editBtna:(UIButton *)sender {
    self.completion(@"");
    
}

-(void)Cellinit:(NSDictionary*)dic Andresume_id:(NSString*)resume_id
{
    if ([[dic allKeys]containsObject:@"school_name"]) {
        _lb1.text=[NSString stringWithFormat:@"%@",dic[@"graduate_time"]];
        _lb2.text=[NSString stringWithFormat:@"%@",dic[@"school_name"]];
        _lb3.text=[NSString stringWithFormat:@"学历:%@,【%@专业】",dic[@"education"],dic[@"specialty_name"]];
    }else if ([[dic allKeys]containsObject:@"project_name"])
    {
        _lb1.text=[NSString stringWithFormat:@"%@-%@",dic[@"start_time"],dic[@"end_time"]];
        _lb2.text=[NSString stringWithFormat:@"%@",dic[@"project_name"]];
        _lb3.text=[NSString stringWithFormat:@"%@",dic[@"project_description"]];
        
    }
    else
    {
        _lb1.text=[NSString stringWithFormat:@"%@-%@",dic[@"entry_time"],dic[@"quit_time"]];
        _lb2.text=[NSString stringWithFormat:@"公司:%@ 职位:%@",dic[@"company_name"],dic[@"position"]];
        _lb3.text=WXGStr(dic[@"job_description"]);
    }
    _lb3H.constant=[MyUtils GetHeightFromString:_lb3.text Font:[UIFont systemFontOfSize:14] Width:DEVW];
   
}
@end
